﻿@model FluentJqGrid.Mvc4.Demo.Models.ProductModel
@{
    ViewBag.Title = "Load Once";
}

<h2>Load Once</h2>
<table id="fjqgrid">
</table>
<div id="pager">
</div>
@(Html.JqGrid(Model)
        .Name("fjqgrid")
        .Url("/simpleload/loadonceajaxpost")
        .DataType("json")
        .MType("GET")
        .Columns(c =>
                    {
                        c.Bind(m => m.ProductID).Header("ID").SortType(ColumnSortType.Int);
                        c.Bind(m => m.Name).Header("Name").SortType(ColumnSortType.Date);
                        c.Bind(m => m.Size).Header("Size").Align(ColumnAlign.Center);
                        c.Bind(m => m.ProductCategoryID).Header("Category");
                        c.Bind(m => m.ListPrice).Header("List Price").Align(ColumnAlign.Center);
                    })
        .Pager("#pager")
        .RowNum(10)
        .ViewRecords(true)
        .Width("900")
        .AutoWidth(false)
        .ShrinkToFit(true)
        .Height("100%")
        .LoadOnce(true)
        .Caption("Load Once")
        .Render())

<div class="src-container">
    @Html.Partial("_SrcSamples", ViewData["src"])
</div>